﻿<Window x:Class="EPE.WPF.RoleAddForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="RoleAddForm" Height="530" Width="600" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <GroupBox Header="角色信息" Grid.Row="0" Style="{StaticResource GroupBoxStyle}" Margin="5">
            <Grid Style="{StaticResource BorderGridStyle}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"></ColumnDefinition>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition Width="80"></ColumnDefinition>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition Width="120" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    

                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>

                <Label Content="角色名称" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top"/>
                <TextBox Name="txtRoleName" Grid.Row="0" Grid.Column="1"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />

                <StackPanel  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" >
                    <Button Name="btnSave"  Style="{StaticResource ButtonStyle}" Click="btnSave_Click">
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/resources/image/close05.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="保存" HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>
                    <Button Name="btnClose"   Style="{StaticResource ButtonStyle}" Click="btnClose_Click">
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/resources/image/close07.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="取消"  HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>
                </StackPanel>
                
                <GroupBox Header="角色信息"  Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="5" HorizontalAlignment="Center"  Margin="5,0,5,0" Name="groupBox2" VerticalAlignment="Top" >
                    <DataGrid Style="{StaticResource DataGridStyle}" Grid.Row="4"  Grid.Column="0" Grid.ColumnSpan="5" Margin="5,10" Height="280" Width="770" Name="dgLog" HorizontalAlignment="Left"  VerticalAlignment="Top"  AutoGenerateColumns="False" ItemsSource="{Binding}"  SelectionMode="Single" IsReadOnly="True">
                        <DataGrid.Columns>
                            <DataGridTextColumn Visibility="Hidden" Binding="{Binding Id}"></DataGridTextColumn>
                            <DataGridTextColumn Header="功能名" Width="100" Binding="{Binding Date}" ></DataGridTextColumn>
                            <DataGridTextColumn Header="查询" Width="100" Binding="{Binding UserName}" ></DataGridTextColumn>
                            <DataGridTextColumn Header="添加" Width="100" Binding="{Binding Operation}"></DataGridTextColumn>
                            <DataGridTextColumn Header="编辑" Width="100" Binding="{Binding Remark}" ></DataGridTextColumn>


                        </DataGrid.Columns>

                    </DataGrid>
                </GroupBox>


            </Grid>
        </GroupBox>
    </Grid>
</Window>
